//
//  LRXOffline.h
//  路人侠
//
//  Created by zhangxulong on 4/19/16.
//  Copyright © 2016 zhangxulong. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol LRXOfflineDelegate <NSObject>

- (void)didTouchNoDataView;
- (void)didTouchOfflineView;

@end

@interface LRXOfflineView : UIView

/**
 *  没有数据
 *
 *  @param description 描述信息
 *  @param canTouch    是否可点击
 */
- (instancetype)initNoDataWithFrame:(CGRect)frame description:(NSString *)description canTouch:(BOOL)isCanTouch;

/**
 *  没有网络
 *
 *  @param description 描述信息
 *  @param canTouch    是否可点击
 */
- (instancetype)initNoInternetWithFrame:(CGRect)frame description:(NSString *)description canTouch:(BOOL)isCanTouch;

/**
 *  自定义提示图片
 *
 *  @param image       图片对象
 *  @param description 描述信息
 *  @param canTouch    是否可点击
 */
- (instancetype)initImageWithFrame:(CGRect)frame image:(UIImage *)image description:(NSString *)description canTouch:(BOOL)isCanTouch;

/**
 *  自定义提示图片（ImageNamed）
 *
 *  @param imageName   图片名称
 *  @param description 描述信息
 *  @param canTouch    是否可点击
 */
- (instancetype)initImageNameWithFrame:(CGRect)frame imageName:(NSString *)imageName description:(NSString *)description canTouch:(BOOL)isCanTouch;

+ (void)showOfflineView:(NSString * )text toView:(UIView *)view;
+ (void)showOfflineView:(NSString * )text;
+ (void)showAlerView:(NSString *)text toView:(UIView *)view;

@property (nonatomic,weak) id<LRXOfflineDelegate> offlineDelegate;

@end
